package com.example.demo.service;

import com.example.demo.entity.Dakamingxi;
import com.example.demo.entity.Querybyaccountandmac;
import com.example.demo.entity.Querydakamingxiandbydatebymac;

import java.io.IOException;
import java.security.KeyManagementException;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
import java.text.ParseException;
import java.util.List;

/**
 * (Dakamingxi)表服务接口
 *
 * @author makejava
 * @since 2020-04-03 11:12:13
 */
public interface DakamingxiService {

    /**
     * 通过ID查询单条数据
     *
     * @param id 主键
     * @return 实例对象
     */
    Dakamingxi queryById(Integer id);

    /**
     * 查询多条数据
     *
     * @param offset 查询起始位置
     * @param limit 查询条数
     * @return 对象列表
     */
    List<Dakamingxi> queryAllByLimit(int offset, int limit);

    /**
     * 新增数据
     *
     * @param dakamingxi 实例对象
     * @return 实例对象
     */
    Dakamingxi insert(Dakamingxi dakamingxi);

    /**
     * 修改数据
     *
     * @param dakamingxi 实例对象
     * @return 实例对象
     */
    Dakamingxi update(Dakamingxi dakamingxi);

    /**
     * 通过主键删除数据
     *
     * @param id 主键
     * @return 是否成功
     */
    boolean deleteById(Integer id);

    /**
     * 查询api
     * @param account
     * @param date
     * @throws IOException
     * @throws NoSuchAlgorithmException
     * @throws KeyStoreException
     * @throws KeyManagementException
     * @throws ParseException
     */
    List<Querybyaccountandmac> queryByAccount(String account,String date) throws IOException, NoSuchAlgorithmException, KeyStoreException, KeyManagementException, ParseException;

    /**
     *
     * @param mac
     * @param format
     * @return
     */
    List<Querybyaccountandmac> queryByAndMacDate(String mac, String format);

    /**
     *
     * @param mac
     * @param yesDay
     * @param nextDay
     * @return
     */
    List<Querybyaccountandmac> queryByAndMacDate(String mac, String yesDay,String nextDay);

    /**
     *
     * @param s
     * @return
     */
    List<Querybyaccountandmac> queryByDate(String s);
    /**
     *
     * @param yesDay
     * @param nextDay
     * @return
     */
    List<Querybyaccountandmac> queryByDate(String yesDay,String nextDay);

    /**
     *
     * @param dtoList
     */
    void insertDakmingxi(List<Dakamingxi> dtoList);

    /**
     * 查询一周的数据
     * @param account
     * @param lastweek
     * @return
     */

    List<Querybyaccountandmac> queryByTwoDate(String account,String lastweek);

    byte[] exportDaKaMingXi(String uId, String endDate, String mac, String svcID, String startDate, String account);

    List<Querydakamingxiandbydatebymac> queryDakamingxiandbydatebymac(String mac, String date);
    List<Querydakamingxiandbydatebymac> queryDakamingxiandbydatebymac(String date);

    List<Querydakamingxiandbydatebymac> queryDakamingxiandbyWeekbymac(String account,String mac, String startDate, String endDate);

    List<Querydakamingxiandbydatebymac> queryDakamingxiandbyWeek(String startDate, String endDate);

    List<Dakamingxi> queryAll();

    void updateall(List<Dakamingxi> dakamingxiList1);

    void updateDakmingxi(List<Dakamingxi> dtoList1);
}